Optimal. Leaf size=103 \[ \frac {i d \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^2}-\frac {d \cos (a+b x)}{b^2}-\frac {(c+d x) \sin (a+b x)}{b}-\frac {2 i (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4407, 3296, 2638, 4181, 2279, 2391} \[ \frac {i d \text {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^2}-\frac {d \cos (a+b x)}{b^2}-\frac {(c+d x) \sin (a+b x)}{b}-\frac {2 i (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2279
Rule 2391
Rule 2638
Rule 3296
Rule 4181
Rule 4407
Rubi steps
\begin {align*} \int (c+d x) \sin (a+b x) \tan (a+b x) \, dx &=-\int (c+d x) \cos (a+b x) \, dx+\int (c+d x) \sec (a+b x) \, dx\\ &=-\frac {2 i (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {(c+d x) \sin (a+b x)}{b}-\frac {d \int \log \left (1-i e^{i (a+b x)}\right ) \, dx}{b}+\frac {d \int \log \left (1+i e^{i (a+b x)}\right ) \, dx}{b}+\frac {d \int \sin (a+b x) \, dx}{b}\\ &=-\frac {2 i (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {d \cos (a+b x)}{b^2}-\frac {(c+d x) \sin (a+b x)}{b}+\frac {(i d) \operatorname {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^2}-\frac {(i d) \operatorname {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^2}\\ &=-\frac {2 i (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {d \cos (a+b x)}{b^2}+\frac {i d \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^2}-\frac {(c+d x) \sin (a+b x)}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.40, size = 213, normalized size = 2.07 \[ \frac {d \left (i \left (\text {Li}_2\left (-e^{i \left (-a-b x+\frac {\pi }{2}\right )}\right )-\text {Li}_2\left (e^{i \left (-a-b x+\frac {\pi }{2}\right )}\right )\right )+\left (-a-b x+\frac {\pi }{2}\right ) \left (\log \left (1-e^{i \left (-a-b x+\frac {\pi }{2}\right )}\right )-\log \left (1+e^{i \left (-a-b x+\frac {\pi }{2}\right )}\right )\right )-\left (\frac {\pi }{2}-a\right ) \log \left (\tan \left (\frac {1}{2} \left (-a-b x+\frac {\pi }{2}\right )\right )\right )\right )}{b^2}-\frac {d \cos (b x) (b x \sin (a)+\cos (a))}{b^2}-\frac {d \sin (b x) (b x \cos (a)-\sin (a))}{b^2}-\frac {c \sin (a+b x)}{b}+\frac {c \tanh ^{-1}(\sin (a+b x))}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.04, size = 331, normalized size = 3.21 \[ -\frac {2 \, d \cos \left (b x + a\right ) + i \, d {\rm Li}_2\left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - i \, d {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - i \, d {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - {\left (b c - a d\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) + {\left (b c - a d\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) - {\left (b d x + a d\right )} \log \left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) + {\left (b d x + a d\right )} \log \left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + a d\right )} \log \left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) + {\left (b d x + a d\right )} \log \left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) - {\left (b c - a d\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) + {\left (b c - a d\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) + 2 \, {\left (b d x + b c\right )} \sin \left (b x + a\right )}{2 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )} \sec \left (b x + a\right ) \sin \left (b x + a\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 209, normalized size = 2.03 \[ -\frac {d \sin \left (b x +a \right ) x}{b}-\frac {d \cos \left (b x +a \right )}{b^{2}}-\frac {c \sin \left (b x +a \right )}{b}-\frac {d \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}+\frac {d \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}-\frac {i d \dilog \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {d \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}+\frac {d \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}+\frac {i d \dilog \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {d a \ln \left (\sec \left (b x +a \right )+\tan \left (b x +a \right )\right )}{b^{2}}+\frac {c \ln \left (\sec \left (b x +a \right )+\tan \left (b x +a \right )\right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\sin \left (a+b\,x\right )}^2\,\left (c+d\,x\right )}{\cos \left (a+b\,x\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right ) \sin ^{2}{\left (a + b x \right )} \sec {\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________